﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChatPage.aspx.cs" Inherits="SimpleChat.ChatPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="formChat" runat="server">
    <div>       
        <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
        <asp:Timer ID="Timer" runat="server" Interval="100"></asp:Timer>
        <asp:UpdatePanel ID="ChatPanel" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger EventName="Tick" ControlID="Timer"/>
            </Triggers>
            <ContentTemplate>
                <asp:ListView ID="ListView1" runat="server">
                    <ItemTemplate>
                        <%# Eval("Message1") %> <br />
                    </ItemTemplate>
                </asp:ListView>
                <br />                
            </ContentTemplate>
        </asp:UpdatePanel>

        <asp:UpdatePanel ID="MessagePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:TextBox ID="Message" runat="server"></asp:TextBox>
                <asp:Button ID="ButtonSend" runat="server" Text="Send" 
                    onclick="ButtonSend_Click"/>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
